From: Jasper St. Pierre Date: Tue, 2 Oct 2012 23:53:07 +0000 (-0300) Subject: dash: Make the show apps button insensitive when we're dragging a non-favorite X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5652 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=52871c781acb26696adf177e6ab80f138976ca41;p=gnome-shell.git dash: Make the show apps button insensitive when we're dragging a non-favorite This doesn't handle the tooltip case, unfortunately. That will come in a bit. https://bugzilla.gnome.org/show_bug.cgi?id=685313 --- diff --git a/js/ui/dash.js b/js/ui/dash.js index 047588d44..3a7828cf8 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -285,8 +285,16 @@ const ShowAppsIcon = new Lang.Class({ this.setLabelText(_("Show Applications")); }, - // Rely on the dragged item being a favorite handleDragOver: function(source, actor, x, y, time) { + let app = getAppFromSource(source); + if (app == null) + return DND.DragMotionResult.NO_DROP; + + let id = app.get_id(); + let isFavorite = AppFavorites.getAppFavorites().isFavorite(id); + if (!isFavorite) + return DND.DragMotionResult.NO_DROP; + return DND.DragMotionResult.MOVE_DROP; },